package cn.jark.unified.dispose.model;

import cn.jark.unified.dispose.api.RestStatus;

/**
 * @author 雨一直夏灬(须知少年凌云志, 曾许人间第一流)
 * @since 2020-10-28
 */
public class Result<T> {

    private Integer code;

    private String msg;

    private T data;


    public Result(Integer code, String message) {
        this.code = code;
        this.msg = message;
    }

    public Result(RestStatus status) {
        this.code = status.getCode();
        this.msg = status.getMsg();
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
